package com.web.kdl.service.createTable;

/**
 * @Author： shulibin
 * @Date： 2025/8/21 17:32
 * @Describe：
 */
public abstract class AbstractFlywheelTable implements FlywheelTable{
    protected final String siteName;
    protected final String matrixName;
    protected final String flywheelName;
    protected final TableType type;

    public AbstractFlywheelTable(String siteName,String matrixName, String flywheelName, TableType type) {
        this.siteName = siteName;
        this.flywheelName = flywheelName;
        this.matrixName = matrixName;
        this.type = type;
    }

    @Override
    public String getTableName() {
        return String.format("wheel_%s_%s_%s_%s",type.name().toLowerCase(),siteName,matrixName,flywheelName);
    }

    @Override
    public TableType getType() {
        return type;
    }
}
